package observer.advanced;

/**
 * 看NBA的同事
 * @author Chen Guang
 * @date 2019/4/9 0009 下午 16:17
 */
public class NBAObserver{

    private Subject subject;
    private String name;

    public NBAObserver(Subject subject, String name) {
        this.subject = subject;
        this.name = name;
        System.out.println(name + "正在看刺激的篮球游戏，湖人总冠军！");
    }

    /**
     * 每个具体的观察者有具有不同的行为
     * NBA的是关掉NBA 炒股的是关闭股票窗口
     */
    public void closeNBADirectSeeding() {
        System.out.println(name + " " + subject.getSubjectState() + " 关闭CCTV5,AI牛逼，韦德牛逼，继续工作!");
    }
}
